<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>jb-aptech毕业设计项目</TITLE>
<meta name="renderer" content="ie-comp">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="../../css/style.css" rel="stylesheet" type="text/css">
<script src="../../script/common.js"></script>
	<script src="../../script/vue.js"></script>
	<script src="../../script/jquery-3.3.1.min.js"></script>
</head>
<body>

<div id="app">
	<div class="page_title">客户流失管理</div>
	<div class="button_bar">
		<button class="common_button" onclick="help('');">帮助</button>
		<button class="common_button" @click.prevent="load()">查询</button>
	</div>
	<table class="query_form_table">
		<tr>
			<th>客户</th>
			<td><input v-model="lost.lst_cust_name"/></td>
			<th>客户经理</th>
			<td><input v-model="lost.lst_cust_manager_name"/></td>
			<th v-model="lost.lst_status">状态</th>
			<td>
				<select>
					<option>全部</option>
					<option>预警</option>
					<option>暂缓流失</option>
					<option>确认流失</option>
				</select>
			</td>
		</tr>
	</table>
	<br />
	<table class="data_list_table">
		<tr>
			<th>编号</th>
			<th>客户</th>
			<th>客户经理</th>
			<th>上次下单时间</th>
			<th>确认流失时间</th>
			<th>状态</th>
			<th>操作</th>
		</tr>
		<tr v-for="l in losts">
			<td class="list_data_number" v-text="l.lst_id">1</td>
			<td class="list_data_text" v-text="l.lst_cust_name">阳光实业</td>
			<td class="list_data_ltext" v-text="l.lst_cust_manager_name">球球</td>
			<td class="list_data_text" v-text="l.lst_last_order_date">2005年12月07日</td>
			<td class="list_data_text" v-text="l.lst_lost_date">　</td>
			<td class="list_data_text" v-text="l.lst_status">暂缓流失</td>
			<td class="list_data_op">
				<img onclick="to('confirm.html');" title="确认流失" src="../../images/bt_confirm.gif" class="op_button" />
				<img onclick="to('relay.html');" title="暂缓流失" src="../../images/bt_relay.gif" class="op_button" />

			</td>
		</tr>
		<tr>
			<th colspan="7" class="pager">
				<div class="pager">
					共<span v-text="pageInfo.total"></span>条记录 每页<input :value="pageInfo.pageSize" size="2" />条
					第<input :value="pageInfo.pageNum" size="2"/>页/共2页
					<a href="#">第一页</a>
					<a href="#" @click.prevent="load(pageInfo.pageNum-1)">上一页</a>
					<a href="#" @click.prevent="load(pageInfo.pageNum+1)">下一页</a>
					<a href="#">最后一页</a>
					转到<input value="1" size="2" />页
					<button width="20" onclick="reload();">GO</button>
				</div>
			</th>
		</tr>
	</table>
</div>
<script>
	const vm = new Vue({
		el:'#app',
		data:{
			losts:[],
			pageinfo:{},
			lost:{
				lst_id:'',
				lst_cust_name:'',
				lst_cust_manager_name:'',
				lst_last_order_date:'',
				lst_lost_date:'',
				lst_status:'',
				pageSize:2,
				pageNum:1,
			},
		},methods:{
			load(num){
				this.lost.pageNum=num
				$.getJSON("/CstLost/queryPage",this.lost,json=>{
					this.losts=json.data.pageInfo.list;
					this.pageInfo=json.data.pageInfo;
				})
			},
		},mounted(){
			this.load();
		},
	});
</script>
</body>
</html>